import java.util.Scanner;

public class Practice01 {
    public static void main(String[] args) {
        Student[] students = new Student[2];

        Student student01 = new Student();
        student01.name = "小芳";
        student01.gender = '女';
        student01.hairstyle = "辫子又粗又长";
        student01.age = 18;

        Student student02 = new Student();
        student02.name = "小胖";
        student02.gender = '男';
        student02.hairstyle = "短发";
        student02.age = 20;

        students[0] = student01;
        students[1] = student02;

        Dog[] dogs = new Dog[2];

        Dog dog01 = new Dog();
        dog01.name = "小白";
        dog01.variety = "贵宾犬";

        Dog dog02 = new Dog();
        dog02.name = "小黑";
        dog02.variety = "牧羊犬";

        dogs[0] = dog01;
        dogs[1] = dog02;

        System.out.println("请输入想要查找信息的学生的学号：");
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();

        students[num - 1].show();
        if (num == 1) {
            System.out.println("养的狗狗们：" );
            for (int i = 0; i < dogs.length; i++) {
                dogs[i].show();
                System.out.println();
            }
        }
    }
}
